package com.bonc.rms.service.impl.tms;

import java.sql.Date;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bonc.odk.logmanager.LogManager;
import com.bonc.rms.dao.tms.ISalaryRecordDao;
import com.bonc.rms.service.tms.ISalaryRecordService;

@Service
public class SalaryRecordServiceImpl implements ISalaryRecordService{

	@Autowired
	ISalaryRecordDao salaryRecordDao;
	
	@Override
	public List<Map<String, Object>> getSalaryRecordByJobNumber(String jobNumber) {
		LogManager.Method("In  Service : SalaryRecordServiceImpl -> getSalaryRecordByJobNumber");
		LogManager.Method("Out Service : SalaryRecordServiceImpl -> getSalaryRecordByJobNumber");
		return salaryRecordDao.getSalaryRecordByJobNumber(jobNumber);
	}

	@Override
	public List<Map<String, Object>> getSalaryRecordByJobNumberAndBetweenDate(String jobNumber, Date startDate, Date endDate) {
		LogManager.Method("In  Service : SalaryRecordServiceImpl -> getSalaryRecordByJobNumberAndBetweenDate");
		LogManager.Method("Out Service : SalaryRecordServiceImpl -> getSalaryRecordByJobNumberAndBetweenDate");
		return salaryRecordDao.getSalaryRecordByJobNumberAndBetweenDate(jobNumber, startDate, endDate);
	}

	@Override
	public List<Map<String, Object>> getSalaryRecordByJobNumberAndBeforeDate(String jobNumber, Date beforeDate) {
		LogManager.Method("In  Service : SalaryRecordServiceImpl -> getSalaryRecordByJobNumberAndBeforeDate");
		LogManager.Method("Out Service : SalaryRecordServiceImpl -> getSalaryRecordByJobNumberAndBeforeDate");
		return salaryRecordDao.getSalaryRecordByJobNumberAndBeforeDate(jobNumber, beforeDate);
	}
	
	@Override
	public List<Map<String, Object>> getSalaryRecordByJobNumberAndAfterDate(String jobNumber, Date afterDate) {
		LogManager.Method("In  Service : SalaryRecordServiceImpl -> getSalaryRecordByJobNumberAndAfterDate");
		LogManager.Method("Out Service : SalaryRecordServiceImpl -> getSalaryRecordByJobNumberAndAfterDate");
		return salaryRecordDao.getSalaryRecordByJobNumberAndAfterDate(jobNumber, afterDate);
	}

}
